﻿using System;
using eCommerce.core.Authenticated;
using eCommerce.core.Helpers;
using eCommerce.db.BORespository;

namespace eCommerce.cms.Controls
{
    public partial class All : AuthenticatedControl
    {
        public string OrderCount    = string.Empty;
        public string ArticleCount  = string.Empty;
        public string CustomerCount = string.Empty;
        public string ProductCount  = string.Empty;
        public string CommentCount  = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            OrderCount      = Utils.FormatPrice(AllSystemBo.GetStatisticsByType(CurrentUser.StoreId, 1));
            CustomerCount   = Utils.FormatPrice(AllSystemBo.GetStatisticsByType(CurrentUser.StoreId, 2));
            ProductCount    = Utils.FormatPrice(AllSystemBo.GetStatisticsByType(CurrentUser.StoreId, 3));
            CommentCount    = Utils.FormatPrice(AllSystemBo.GetStatisticsByType(CurrentUser.StoreId, 4));
            ArticleCount    = Utils.FormatPrice(AllSystemBo.GetStatisticsByType(CurrentUser.StoreId, 5));
        }
    }
}